package com.jeeplus.modules.anny.utils;


import com.jeeplus.common.beans.ResultBean;

public class ResultBeanUtil {

    public static ResultBean success(){
        return new ResultBean<>();
    }

    public static <T> ResultBean success(T data){
        return new ResultBean<T>(data);
    }

    public static ResultBean fail(Throwable e){
        return new ResultBean<>(e);
    }

    /**
     * 前台不处理异常code统一等于100，仅展示msg信息
     * @param msg
     * @return
     */
    public static ResultBean failNohandle(String msg){
        return new ResultBean<>(100, msg);
    }


}
